package com.clouds.wms.service;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.clouds.wms.bean.Invmd;
import com.clouds.wms.dao.InvmcDao;
import com.clouds.wms.dao.InvmdDao;
import com.clouds.wms.exception.SysException;
import com.clouds.wms.util.PagesBean;

@Service("invmdService")
public class InvmdServiceImpl implements InvmdService {
	@Resource(name="invmcDao")
	private InvmcDao invmcDao;
	@Resource(name="invmdDao")
	private InvmdDao invmdDao;

	@Override
	public PagesBean getInvmdList(String maaa, String maab, int offset,	int pageSize) throws SysException {
		return invmdDao.getInvmdList(maaa, maab, offset, pageSize);
	}

	@Override
	public int saveInvmd(Invmd invmd) throws SysException {
		return invmdDao.saveInvmd(invmd);
	}

	@Override
	public int getMaxMdae() throws SysException {
		return invmdDao.getMaxMdae();
	}

	@Override
	public int delInvmd(String mbaa, String mbab, String mbacs)	throws SysException {
		return invmdDao.delInvmd(mbaa, mbab, mbacs);
	}

	@Override
	public int updateInvmd(Invmd invmd) throws SysException {
		return invmdDao.updateInvmd(invmd);
	}

	@Override
	public int changeStatus(String mbaa, String mbab, String status)throws SysException {
		return invmdDao.changeStatus(mbaa, mbab, status);
	}

	@Override
	public void delInvmdmd(String mcaa, String mcab) throws SysException {
		invmcDao.delInvmcByAaAb(mcaa, mcab);
		invmdDao.delInvmdByAaAb(mcaa, mcab);
	}

	@Override
	public void delInvmdAll(String mcaa, String mcab) throws SysException {
		invmdDao.delInvmdByAaAb(mcaa, mcab);
	}
}
